<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增课程')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-schedule-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">科目：</label>
            <div class="col-sm-8">
                <input name="userId"
                       th:value="${@permission.getPrincipalProperty('userId')}" type="hidden">
                <input name="title" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">摘要：</label>
            <div class="col-sm-8">
                <textarea name="content" class="form-control"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">简单示例</label>
            <div class="input-group date col-sm-8">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input type="text" name="totalTime" class="form-control" id="datetimepicker-demo-1"
                       placeholder="yyyy-MM-dd HH:mm">
            </div>
        </div>
        <!--<div class="form-group">
            <label class="col-sm-3 control-label">年：</label>
            <div class="col-sm-8">
                <input name="year" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">月：</label>
            <div class="col-sm-8">
                <input name="month" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">天：</label>
            <div class="col-sm-8">
                <input name="day" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">时：</label>
            <div class="col-sm-8">
                <input name="hour" class="form-control" type="text">
            </div>
        </div>-->
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
    $(function () {
        $("#datetimepicker-demo-1").datetimepicker({
            autoclose: true
        });
    })
    var prefix = ctx + "system/schedule"
    $("#form-schedule-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-schedule-add').serialize());
        }
    }
</script>
</body>
</html>
